<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	
<ui:composition template="#{facesContext.externalContext.request.contextPath}/templates/main_template.xhtml">

	<ui:param name="bean" value="#{roomListBean_wordchat}" />

	<ui:define name="templateContent">

		<h:form id="chatRoomForm">
			<h:commandButton id="createRoomBtn" value="Create a Room" action="#{bean.gotoCreateRoom(facesContext.externalContext.request.contextPath)}"></h:commandButton>
		
			<ul data-role="listview" data-divider-theme="c" data-inset="true">
				<li data-role="list-divider" role="heading">Chat rooms</li>
				<c:forEach var="room" items="#{bean.rooms}">
					<li data-theme="c">
						<a href="#{facesContext.externalContext.request.contextPath}/chat/wordchat/roomlogin.xhtml?room=#{room.roomName}" data-transition="slide">#{room.roomName}</a>
					</li>
				</c:forEach>
			</ul>
		</h:form>

	</ui:define>

</ui:composition>

</html>
